<?php

$db = new MyDB();

if(!$db) { 
		echo $db->lastErrorMsg();
}

$count_sql = "select uid, login, password, name, admin from USERS";

$results = $db->query($count_sql);
	while ($row = $results->fetchArray(SQLITE3_ASSOC)) {
		$uid_u[] = $row['uid'];
		$login_u[] = $row['login'];
		$password_u[] = $row['password'];
		$name_u[] = $row['name'];
		$admin_u[] = $row['admin'];
	}
	
$smarty->assign('uid', $uid_u);
$smarty->assign('login', $login_u);
$smarty->assign('password', $password_u);
$smarty->assign('name', $name_u);
$smarty->assign('admin', $admin_u);

$db->close();

?>